package org.jash.ting13.entity

import android.app.Activity
import android.app.ActivityOptions
import android.content.Intent
import android.view.View
import com.facebook.drawee.view.SimpleDraweeView
import org.jash.converters.Xpath
import org.jash.ting13.R
import org.jash.ting13.book.BookActivity

/**
 * Created by Jash
 */
data class HBookEntity (
    @Xpath("./a/@title")
    val title:String,
    @Xpath("./a/@href")
    val url:String,
    @Xpath("./a/img/@src")
    val img:String
) {
    fun showDetail(v:View) {
//        val icon:SimpleDraweeView = v.findViewById(R.id.image)
        v.context.startActivity(Intent(v.context, BookActivity::class.java).apply { putExtra("url", url) })
    }
}